/*
 * Copyright (C) 2008-2012  Paulo Cesar Pereira de Andrade.
 *
 * This is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * Authors:
 *	Paulo Cesar Pereira de Andrade
 */

#ifndef _eread_h
#define _eread_h

#include "etypes.h"

#define eread_error(...)		enote_error(&input_note, __VA_ARGS__)

/*
 * Types
 */
struct einput {
    estream_t		*stream;
    eint32_t		 lineno;
    eint32_t		 column;
};

/*
 * Prototypes
 */
extern void
init_read(void);

extern void
finish_read(void);

extern eobject_t
eread_object(void);

extern void
epush_input(estream_t *stream);

/*
 * Externs
 */
extern einput_t		*input;
extern enote_t		 input_note;
extern eobject_t	 object_eof;

#endif /* _eread_h */
